package com.yilife.hmstr.controller;

import com.yilife.hmstr.domain.FiveElementsReport;
import com.yilife.hmstr.service.impl.FiveElementsReportServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/fer")
@Api(description = "五行图数据的增删改查")

public class FiveElementsReportController {

    @Autowired
    private FiveElementsReportServiceImpl fiveElementsReportService;

    @RequestMapping(value = "/del",method = RequestMethod.DELETE)
    @ApiOperation(value = "根据健康管理系统检测报告id删除五行图数据")
    public void del(@RequestBody Long hmstrId){
        fiveElementsReportService.delByPid(hmstrId);
    }

    @RequestMapping(value = "/sel",method = RequestMethod.GET)
    @ApiOperation(value = "根据健康管理系统检测报告id查询五行图数据")
    public FiveElementsReport select(@RequestParam Long hmstrId){
//        System.out.print("9999999"+hmstrId);
        return fiveElementsReportService.selectByPid(hmstrId);
    }

}
